﻿@using FluentNHibernate.Utils
@model Hazza.eLearning.Models.HazzaExamPart
           
@{
    // Styles
    Style.Require("jQueryColorBox");

    // Scripts
    Script.Require("jQueryColorBox").AtFoot();

    var containerId = Model.ContentItem.Id;
}

           
<fieldset>
    <div>
        <input type="button" id="addExam" value="Add Question"/>
    </div>
</fieldset>

@using (Script.Foot()) {
    <script type="text/javascript">
        var addInput = $("#addExam");

        addInput.click(function() {
            var url = '@HttpUtility.JavaScriptStringEncode(Url.Action("Create", "Admin", new { area = "Contents", id = "QuestionTest", contId = containerId }))';
            $.colorbox({
                href: url,
                iframe: true,
                reposition: true,
                width: "100%",
                height: "100%",
                onLoad: function() { // hide the scrollbars from the main window
                    $('html, body').css('overflow', 'hidden');
                    //$('#cboxClose').remove();
                },
                onClosed: function() {
                    $('html, body').css('overflow', '');
                }
            });
        });
    </script>
}